package com.fortune.controller;

import com.fortune.base.BaseAPIExcution;
import com.fortune.dto.excution.ClientExcution;
import com.fortune.dto.excution.MChannelDiscountExcution;
import com.fortune.enums.ClientEnum;
import com.fortune.enums.MChannelDiscountEnum;
import com.fortune.service.BoxDepositService;
import com.fortune.vo.BoxDeposit.BoxDepositInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Api(value = "boxDeposit", description = "商品箱子单个押金", tags = {"商品箱子押金相关"})
@RestController
@RequestMapping("boxDeposit")
public class BoxDepositController {
    @Autowired
    private BoxDepositService boxDepositService;

    @ApiOperation(value = "箱子押金参数",nickname ="boxDeposit",notes = "",tags = {"@郭阳"})
    @PostMapping(value = "boxDeposit",
            produces = { MediaType.APPLICATION_JSON_VALUE },
            consumes = { MediaType.APPLICATION_JSON_VALUE })
    public BaseAPIExcution<List<BoxDepositInfo>> boxDeposit(){
        List<BoxDepositInfo> findBoxDepositInfo = boxDepositService.findBoxDepositInfo();
        return new ClientExcution<List<BoxDepositInfo>>(findBoxDepositInfo, ClientEnum.FIND_SUCCESS);
    }
}
